Hello,
I'm trying to write a trigger the would find the correct baseline module within the BaselineSet under review(*.ini). I was wondering is there a way that the focus can be put on the module window of the open baseline rather than the Database explorer? Do you see any improves I should make/are there any mistakes within my code I should address? Thank you
? for Dynamic Trigger - Once deployed is there a way of deleting them without closing down the DOORS client? I can parse the triggers in the Database but how do you know it the correct Trigger for deletion "name(t) gives e.g. dynamic 1" EHcnck - Fri Sep 19 09:02:16 EDT 2014 |
Re: Trigger (help needed) Did you ever get an answer to the question about deleting dynamic triggers. If I understand the question correctly... I have the same problem... i.e. there does not appear to be a way to control the "name" of dynamic triggers. The idea would be to control the "names" of dynamic triggers in a way that makes it easy to find them later (for deletion). Would you please share how you solved this problem? Regards, Bob Sherman |
Re: Trigger (help needed) Hi !
The trigger deletion (management ...) is not so hard ;)
Trigger t = null
DBE l = null
// function activated by trigger
void trig_activation(Trigger t){
Object o = object(t)
if (null o) return
set( l, "Object " o."absolute number""" )
}
// add a gui to manage the trigger
void install_trigger(DB x){
t = trigger(project->module->"/ESPACE TEST DOORS/pommCannelle/essai 2"->object, sync, 5, trig_activation)
if ( null t ) set(l, "FAIL to actrivate the trigger")
else set(l, "trigger activation OK")
}
void delete_trigger(DB x){
if (null t) return
string errmess = delete t
if ( ! null errmess ) set(l, errmess "")
else set(l, "Trigger deletion OK")
}
void do_close(DB x){
if ( ! null t ) delete_trigger(null)
hide x; destroy x
}
// build the gui
DB test = create "do what you want in dxl..."
l = label(test, "")
apply(test, "Add trigger", install_trigger)
apply(test, "Remove trigger", delete_trigger)
close (test, false, do_close)
realize(test){
setSize(test, 300, 110)
}
show test
Well ... regarding your concern, i have to admit this code is unfair ;)
Now we have a structure to store our dynamic trigger ! |